// 公司设置相关接口请求
import request from '@/utils/request'

// 查询列表
export const getRoleListApi = (params) =>
  request({
    url: '/sys/role',
    method: 'GET',
    params
  })
// 查询单个
export const getRoleInfoApi = (id) =>
  request({
    url: '/sys/role/' + id,
    method: 'GET'
  })

// 增
export const addRoleApi = (data) =>
  request({
    url: '/sys/role',
    method: 'POST',
    data
  })

// 改
export const editRoleApi = (data) =>
  request({
    url: '/sys/role/' + data.id,
    method: 'PUT',
    data
  })

// 删
export const delRoleApi = (id) =>
  request({
    url: '/sys/role/' + id,
    method: 'DELETE'
  })

// 根据ID查询企业信息
export const getCompanyInfoApi = (id) => {
  return request({
    url: '/company/' + id,
    method: 'get'
  })
}
